Technical Q&A QA1015
Why am I drawing directly to the screen?


Q: I'm trying to access the bits of the window back buffer directly using GetWindowPort, GetPortPixMap, and GetPixBaseAddr but whenever I do my drawing appears in the upper left corner of the screen instead. What am I doing wrong?

A: In order to directly access the bits in the back buffer for a window, you must call LockPortBits before you get the PixMap, base address, and row bytes. Otherwise, your base address is still pointing to screen memory.


[Feb 19, 2004]


Developer Documentation | Technical Notes | Development Kits | Sample Code